import { ElDialog } from "element-plus";
import { computed, defineComponent } from "vue";
import { useDetailDialogStore } from "./detail";

export default defineComponent({
    name: 'DetailDialog',
    setup() {

        const detailDialogStore = useDetailDialogStore()
        const dataOne: any = computed(() => detailDialogStore.getDataOne)
        const visible = computed(() => detailDialogStore.getVisible)
        console.log('object visible', visible.value);

        const handleClose = () => {
            detailDialogStore.closeVisible()
        }
        return () => {
            return (
                <>

                    <ElDialog v-model={visible.value} title="弹窗" width="400" before-close={handleClose}>
                        {dataOne.value.meta.title}
                    </ElDialog>
                </>
            )
        }
    }
})